home *** CD-ROM | disk | FTP | other *** search
/ Utilities Professional 1-1500 / Utilities Professional 1-1500 (1994)(WPD)[!].iso / 12511500 / var1287.dms / var1287.adf / snap.AMOS / snap.amosSourceCode
AMOS Source Code  |  1989-08-11  |  4KB  |  139 lines

  1. Screen Open 0,320,256,32,Lowres : Double Buffer : Curs Off : Cls 0 : Paper 0 : Pen 5 : Flash Off : Hide 
  2. Rem Andy Paul,22 CEYLON PLACE,EASTBOURNE,EAST SUSSEX.
  3. Rem Use this program if you like,but please give any credit where it's due 
  4. Rem fanks very much....
  5. Rem load the talking bit ready for the computer to say snap
  6. Set Talk ,,,
  7. SNAP
  8. Rem its only procedured because it looks nice and neat,,,until you open it 
  9. Procedure SNAP
  10. Rem load the sprites 
  11. Load "bobs/snap.abk" : Get Sprite Palette 
  12. Rem give instructions_______"no....you don't say",well sandra,you said rem   
  13. 'the programs well.....
  14. Centre "SNAP by A.paul using AMOS..."
  15. Print ""
  16. Print ""
  17. Pen 6
  18. Print "INSTRUCTIONS---"
  19. Pen 9
  20. Print ""
  21. Print ""
  22. Print "  Every thing is controlled by the"
  23. Print " joystick."
  24. Print ""
  25. Pen 10
  26. Print "  Push up to twist your card...."
  27. Print ""
  28. Print "  Press FIRE to call the words---"
  29. Print "              SNAP"
  30. Print ""
  31. Pen 12
  32. Print " The arrow at the top of the screen"
  33. Print " tells you who's go it is.You are on"
  34. Print " the left side."
  35. Print ""
  36. Print ""
  37. Print ""
  38. Pen 15 : Centre "PRESS ANY KEY....."
  39. Clear Key : Wait Key : Cls 0
  40. Home 
  41. Centre "SNAP by A.Paul using AMOS..."
  42. Rem the next 3 lines draw a simple star field effect 
  43. For A=1 To 50
  44. Plot Rnd(320),Rnd(256),Rnd(6)
  45. Next A
  46. Rem Place all the cards and bobs in relevant places
  47. Rem Image 9 is blank 
  48. Bob 1,10,50,7
  49. Bob 2,250,50,7
  50. Bob 3,110,40,9
  51. Bob 4,140,75,9
  52. Bob 5,25,20,9
  53. Bob 6,265,20,9
  54. MAIN:
  55. Locate 0,25
  56. Print "  YOU HAVE                      I HAVE"
  57. Print ""
  58. Print ""
  59. Print ""
  60. Print "  CARDS                         CARDS"
  61. Locate 2,27 : Print "30 "
  62. Locate 32,27 : Print "30 "
  63. Rem Y=players cards,M=computers cards,C=amount of cards in the middle
  64. Y=30 : M=30 : C=0
  65. Do 
  66.  Rem bob 5+6 are the arrows 
  67.  Bob 6,,,9 : Bob 5,,,8
  68. Rem if Y or M=0 then that person has lost,so check to see if anyone is 0 
  69.  If Y=0 Then Gosub MWUN
  70.  If M=0 Then Gosub YWUN
  71.  Rem wait for user to push joystick up
  72.  Repeat 
  73.  Until Jup(1)
  74.  Shoot 
  75.  Rem goto the twist bit 
  76.  Gosub TWIST
  77. Rem if Image bob 3 is the same as 4 then we've got a snap
  78.  If I Bob(3)=I Bob(4) Then Gosub SNAP
  79.  Bob 5,,,9 : Bob 6,,,8
  80.  If Y=0 Then Gosub MWUN
  81.  If M=0 Then Gosub YWUN
  82. Rem wait for a random amount up to 200,it gives a more realistic feel
  83.  Wait Rnd(200)+1
  84.  Shoot : Bob 4,,,Rnd(6) : Dec M : Locate 32,27 : Print M;"  " : Inc C
  85.  If I Bob(4)=0 Then Bob 4,,,3
  86.  If I Bob(3)=I Bob(4) Then Gosub SNAP
  87. Loop 
  88. TWIST:
  89. Bob 3,,,Rnd(6)
  90. Rem using Rnd()means the number could be 0,we dont want nothing showing so.. 
  91. If I Bob(3)=0 Then Bob 3,,,3
  92. Dec Y : Inc C
  93. Locate 2,27 : Print Y;"  "
  94. Return 
  95. Rem This sub gives the player a chance to call snap
  96. SNAP:
  97. T=0
  98. Rem if you want less chance of beating the computer make 2000 lower  
  99. Rem Below a 1000 you've no chance
  100. Repeat 
  101. Inc T
  102. If T=1800 Then Say "snap   ." : Say "har har." : M=M+C : C=0 : Locate 32,27 : Print M;"  " : Bob 3,,,9 : Bob 4,,,9 : Return 
  103. Until Fire(1)
  104. Rem This makes a choice of four random sayings 
  105. WHATSAID=Rnd(3)
  106. If WHATSAID=0 Then Goto 30
  107. If WHATSAID=1 Then Goto 31
  108. If WHATSAID=2 Then Goto 32
  109. If WHATSAID=3 Then Goto 33
  110. 30 Say "thats not fair." : Goto 34
  111. 31 Say "  your a cheat." : Goto 34
  112. 32 Say "next wuns mine." : Goto 34
  113. 33 Say "           huh."
  114. 34
  115. Rem Y+C is now the users total,and C becomes 0 (No cards in middle)  
  116. Y=Y+C : C=0 : Locate 2,27 : Print Y;"  "
  117. Bob 3,,,9 : Bob 4,,,9
  118. Return 
  119. YWUN:
  120. Bob 5,,,9 : Bob 6,,,9
  121. Say "you wun."
  122. Say "would you like another go."
  123. Say "move joystick up for yes."
  124. Say "move joystick down for no."
  125. Do 
  126. If Jup(1) Then Gosub MAIN
  127. If Jdown(1) Then Show : Run "menu.amos"
  128. Loop 
  129. MWUN:
  130. Bob 5,,,9 : Bob 6,,,9
  131. Say "yip pee i wun."
  132. Say "would you like another go."
  133. Say "move joystick up for yes."
  134. Say "move joystick down for no."
  135. Do 
  136. If Jup(1) Then Gosub MAIN
  137. If Jdown(1) Then Show : Run "menu.amos"
  138. Loop 
  139. End Proc